home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch1c < prev    next >
Encoding:
Internet Message Format  |  1989-08-08  |  57.2 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v07i096:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch1c
  5. Message-ID: <4390@tekred.CNA.TEK.COM>
  6. Date: 3 Aug 89 16:58:00 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2135
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 7, Issue 96
  13. Archive-name: NetHack3/Patch1c
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 3 (of 6)."
  25. # Contents:  src1.diff
  26. # Wrapped by billr@saab on Thu Aug  3 09:57:11 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'src1.diff' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'src1.diff'\"
  30. else
  31. echo shar: Extracting \"'src1.diff'\" \(54643 characters\)
  32. sed "s/^X//" >'src1.diff' <<'END_OF_FILE'
  33. XSource patches, part 1
  34. X
  35. X------------------------------------Cut------------------------------------
  36. X*** src/Old/Makefile.src    Mon Jul 31 13:42:55 1989
  37. X--- src/Makefile.src    Mon Jul 31 12:40:38 1989
  38. X***************
  39. X*** 26,31 ****
  40. X--- 26,40 ----
  41. X  # Systos wants 'pc'; everything else normally wants 'unix'
  42. X  TARG = unix
  43. X  
  44. X+ # if you are using gcc as your compiler:
  45. X+ #    add -fwritable-strings to your other CFLAGS
  46. X+ #    uncomment the CC definition below if it's not in your environment
  47. X+ #    ignore warnings about initializing non-const *s from const *s
  48. X+ #    if you get setcgtty() warnings during execution, you are feeding gcc
  49. X+ #        a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
  50. X+ #        -traditional in CFLAGS
  51. X+ # CC = gcc
  52. X+ 
  53. X  # flags may have to be changed as required
  54. X  # flags for 286 Xenix:
  55. X  # CFLAGS = -O -Gt24 -LARGE -Ml -I../include
  56. X***************
  57. X*** 60,67 ****
  58. X  # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
  59. X  YACC     = yacc
  60. X  LEX      = lex
  61. X! #YACC     = bison
  62. X! #LEX      = flex
  63. X  
  64. X  # make NetHack
  65. X  GAME     = nethack
  66. X--- 69,76 ----
  67. X  # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
  68. X  YACC     = yacc
  69. X  LEX      = lex
  70. X! # YACC     = bison -y
  71. X! # LEX      = flex
  72. X  
  73. X  # make NetHack
  74. X  GAME     = nethack
  75. X***************
  76. X*** 85,96 ****
  77. X         mthrowu.c music.c o_init.c objects.c objnam.c options.c pager.c\
  78. X         pickup.c polyself.c potion.c pray.c pri.c priest.c prisym.c read.c\
  79. X          restore.c rip.c rnd.c rumors.c save.c search.c shk.c shknam.c sit.c\
  80. X!        sounds.c sp_lev.c spell.c steal.c termcap.c timeout.c topl.c topten.c\
  81. X!        track.c trap.c u_init.c uhitm.c vault.c version.c weapon.c were.c\
  82. X!        wield.c wizard.c worm.c worn.c write.c zap.c
  83. X  
  84. X! # all .c files but msdos.c, tos.c, *main.c, *tty.c, *unix.c, (system specific)
  85. X! # and makedefs.c, lev_comp.c, panic.c (not part of any nethack)
  86. X  
  87. X  CSOURCES = $(HACKCSRC) $(TARG)main.c $(TARG)main.c $(TARG)main.c makedefs.c panic.c
  88. X  
  89. X--- 94,104 ----
  90. X         mthrowu.c music.c o_init.c objects.c objnam.c options.c pager.c\
  91. X         pickup.c polyself.c potion.c pray.c pri.c priest.c prisym.c read.c\
  92. X          restore.c rip.c rnd.c rumors.c save.c search.c shk.c shknam.c sit.c\
  93. X!        sounds.c sp_lev.c spell.c steal.c termcap.c timeout.c topl.c\
  94. X!        topten.c track.c trap.c u_init.c uhitm.c vault.c version.c weapon.c\
  95. X!        were.c wield.c wizard.c worm.c worn.c write.c zap.c
  96. X  
  97. X! # all .c that are part of the main NetHack program and are not system specific
  98. X  
  99. X  CSOURCES = $(HACKCSRC) $(TARG)main.c $(TARG)main.c $(TARG)main.c makedefs.c panic.c
  100. X  
  101. X***************
  102. X*** 144,152 ****
  103. X      @$(LD) $(LFLAGS) /lib/crt0s.o /lib/shlib.ifile -o $(GAME) $(HOBJ)
  104. X      @touch Sysatt
  105. X  
  106. X! Systos:    $(HOBJ) tos.o Makefile
  107. X      @echo "Loading ..."
  108. X!     @$(CC) $(LFLAGS) -o $(GAME) $(HOBJ) tos.o $(TERMLIB)
  109. X      @touch Systos
  110. X  
  111. X  SysV-AT:    DUMB.Setup $(HOBJ) Makefile
  112. X--- 152,160 ----
  113. X      @$(LD) $(LFLAGS) /lib/crt0s.o /lib/shlib.ifile -o $(GAME) $(HOBJ)
  114. X      @touch Sysatt
  115. X  
  116. X! Systos:    $(HOBJ) oldtos.o Makefile
  117. X      @echo "Loading ..."
  118. X!     @$(CC) $(LFLAGS) -o $(GAME) $(HOBJ) oldtos.o $(TERMLIB)
  119. X      @touch Systos
  120. X  
  121. X  SysV-AT:    DUMB.Setup $(HOBJ) Makefile
  122. X***************
  123. X*** 351,357 ****
  124. X      @rm -f Makefile.bak
  125. X  
  126. X  # PC dependency for Systos that won't be made on a UNIX system
  127. X! tos.o:    ../include/hack.h ../include/osbind.h
  128. X  
  129. X  # DO NOT DELETE THIS LINE
  130. X  
  131. X--- 359,365 ----
  132. X      @rm -f Makefile.bak
  133. X  
  134. X  # PC dependency for Systos that won't be made on a UNIX system
  135. X! oldtos.o:  ../include/hack.h
  136. X  
  137. X  # DO NOT DELETE THIS LINE
  138. X  
  139. X*** src/Old/apply.c    Mon Jul 31 13:44:15 1989
  140. X--- src/apply.c    Sat Jul 29 12:04:03 1989
  141. X***************
  142. X*** 158,163 ****
  143. X--- 158,167 ----
  144. X      if(lev->mmask) {
  145. X          mtmp = m_at(rx,ry);
  146. X          mstatusline(mtmp);
  147. X+         if (mtmp->mundetected) {
  148. X+             mtmp->mundetected = 0;
  149. X+             if (cansee(rx,ry)) pmon(mtmp);
  150. X+         }
  151. X          return;
  152. X      }
  153. X      if(lev->typ == SDOOR) {
  154. X***************
  155. X*** 491,497 ****
  156. X--- 495,508 ----
  157. X              lev->typ = CORR;
  158. X              digtxt = "You succeeded in cutting away some rock.";
  159. X          } else if(IS_WALL(lev->typ)) {
  160. X+ #ifdef STUPID
  161. X+                 if (is_maze_lev)
  162. X+                 lev->typ = ROOM;
  163. X+             else
  164. X+                 lev->typ = DOOR;
  165. X+ #else
  166. X              lev->typ = is_maze_lev ? ROOM : DOOR;
  167. X+ #endif
  168. X              digtxt = "You just made an opening in the wall.";
  169. X          } else if(lev->typ == SDOOR) {
  170. X              lev->typ = DOOR;
  171. X***************
  172. X*** 1006,1011 ****
  173. X--- 1017,1023 ----
  174. X          if (uwep->spe > 0 && !rn2(3)) {
  175. X          uwep->spe = 0;
  176. X          djinni_from_bottle(uwep);
  177. X+         makeknown(MAGIC_LAMP);
  178. X          } else if (rn2(2) && !Blind)
  179. X          You("see a puff of smoke.");
  180. X          else pline(nothing_happens);
  181. X*** src/Old/artifact.c    Mon Jul 31 13:45:11 1989
  182. X--- src/artifact.c    Tue Jul 25 14:39:11 1989
  183. X***************
  184. X*** 11,17 ****
  185. X  /* the artifacts (currently weapons only) */
  186. X  static const struct artifact artilist[] = {
  187. X  
  188. X! #define        NO_ATTK    0, 0, 0, 0
  189. X  
  190. X  { LONG_SWORD,     "Excalibur",    (SPFX_NOGEN | SPFX_SEEK | SPFX_DEFN |
  191. X                                  SPFX_SEARCH), 0,
  192. X--- 11,17 ----
  193. X  /* the artifacts (currently weapons only) */
  194. X  static const struct artifact artilist[] = {
  195. X  
  196. X! #define        NO_ATTK    { 0, 0, 0, 0 }
  197. X  
  198. X  { LONG_SWORD,     "Excalibur",    (SPFX_NOGEN | SPFX_SEEK | SPFX_DEFN |
  199. X                                  SPFX_SEARCH), 0,
  200. X*** src/Old/bones.c    Mon Jul 31 13:46:09 1989
  201. X--- src/bones.c    Fri Jul 28 17:53:10 1989
  202. X***************
  203. X*** 4,10 ****
  204. X  
  205. X  #include "hack.h"
  206. X  
  207. X! #ifdef TOS
  208. X  #define OMASK    0x8000
  209. X  #else
  210. X  #define OMASK    0
  211. X--- 4,10 ----
  212. X  
  213. X  #include "hack.h"
  214. X  
  215. X! #ifdef OLD_TOS
  216. X  #define OMASK    0x8000
  217. X  #else
  218. X  #define OMASK    0
  219. X***************
  220. X*** 12,17 ****
  221. X--- 12,20 ----
  222. X  
  223. X  #ifdef DGK
  224. X  char bones[FILENAME];
  225. X+ #ifndef OLD_TOS
  226. X+ extern long bytes_counted;
  227. X+ #endif
  228. X  #else
  229. X  char bones[] = "bones.xx";
  230. X  #endif
  231. X***************
  232. X*** 49,54 ****
  233. X--- 52,58 ----
  234. X          );
  235. X  }
  236. X  
  237. X+ #ifdef TUTTI_FRUTTI
  238. X  static void
  239. X  goodfruit(id)
  240. X  int id;
  241. X***************
  242. X*** 62,67 ****
  243. X--- 66,72 ----
  244. X          }
  245. X      }
  246. X  }
  247. X+ #endif
  248. X  
  249. X  /* save bones and possessions of a deceased adventurer */
  250. X  void
  251. X***************
  252. X*** 70,76 ****
  253. X--- 75,83 ----
  254. X      register struct obj *otmp;
  255. X      register struct trap *ttmp;
  256. X      register struct monst *mtmp, *mtmp2;
  257. X+ #ifdef TUTTI_FRUTTI
  258. X      struct fruit *f;
  259. X+ #endif
  260. X  
  261. X      if(dlevel <= 0 || dlevel > MAXLEVEL) return;
  262. X      if(no_bones_level(dlevel)) return; /* no bones for specific levels */
  263. X***************
  264. X*** 113,122 ****
  265. X--- 120,131 ----
  266. X          if(mtmp->data == &mons[PM_MEDUSA]) mongone(mtmp);
  267. X  #endif
  268. X      }
  269. X+ #ifdef TUTTI_FRUTTI
  270. X      /* mark all fruits as nonexistent; when we come to them we'll mark
  271. X       * them as existing (using goodfruit())
  272. X       */
  273. X      for(f=ffruit; f; f=f->nextf) f->fid = -f->fid;
  274. X+ #endif
  275. X  
  276. X      /* drop everything; the corpse's possessions are usually cursed */
  277. X      otmp = invent;
  278. X***************
  279. X*** 124,130 ****
  280. X--- 133,141 ----
  281. X          otmp->ox = u.ux;
  282. X          otmp->oy = u.uy;
  283. X          otmp->owornmask = 0;
  284. X+ #ifdef TUTTI_FRUTTI
  285. X          if(otmp->otyp == SLIME_MOLD) goodfruit(otmp->spe);
  286. X+ #endif
  287. X          if(rn2(5)) curse(otmp);
  288. X          if(!otmp->nobj){
  289. X              otmp->nobj = fobj;
  290. X***************
  291. X*** 160,166 ****
  292. X--- 171,179 ----
  293. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){
  294. X          for(otmp = mtmp->minvent; otmp; otmp = otmp->nobj) {
  295. X              otmp->dknown = otmp->bknown = 0;
  296. X+ #ifdef TUTTI_FRUTTI
  297. X              if(otmp->otyp == SLIME_MOLD) goodfruit(otmp->spe);
  298. X+ #endif
  299. X              if(uses_known(otmp)) otmp->known = 0;
  300. X              if(otmp->otyp == AMULET_OF_YENDOR && !otmp->spe) {
  301. X              otmp->spe = -1;  /* no longer the actual amulet */
  302. X***************
  303. X*** 186,192 ****
  304. X--- 199,207 ----
  305. X             )
  306. X              otmp->onamelth = 0;
  307. X          if(uses_known(otmp)) otmp->known = 0;
  308. X+ #ifdef TUTTI_FRUTTI
  309. X          if(otmp->otyp == SLIME_MOLD) goodfruit(otmp->spe);
  310. X+ #endif
  311. X          otmp->dknown = otmp->bknown = 0;
  312. X          otmp->invlet = 0;
  313. X  #ifdef MAIL
  314. X***************
  315. X*** 218,226 ****
  316. X  #endif
  317. X          return;
  318. X      }
  319. X      savefruitchn(fd);
  320. X! #ifdef DGK
  321. X!     savelev(fd,dlevel, COUNT | WRITE);
  322. X  #else
  323. X      savelev(fd,dlevel);
  324. X  #endif
  325. X--- 233,262 ----
  326. X  #endif
  327. X          return;
  328. X      }
  329. X+ 
  330. X+ #if defined(DGK) && !defined(OLD_TOS)    /* check whether there is room */
  331. X+     count_only = TRUE;
  332. X+ #ifdef TUTTI_FRUTTI
  333. X      savefruitchn(fd);
  334. X! #endif
  335. X!     savelev(fd, dlevel, COUNT);
  336. X!     bflush(fd);
  337. X!     if (bytes_counted > freediskspace(bones)) {    /* not enough room */
  338. X! #ifdef WIZARD
  339. X!         if (wizard)
  340. X!             pline("Insufficient space to create bones file.");
  341. X! #endif
  342. X!         unlink(bones);
  343. X!         return;
  344. X!     }
  345. X!     count_only = FALSE;
  346. X! #endif /* DGK */
  347. X! 
  348. X! #ifdef TUTTI_FRUTTI
  349. X!     savefruitchn(fd);
  350. X! #endif
  351. X! #if defined(DGK) && !defined(OLD_TOS)
  352. X!     savelev(fd, dlevel, WRITE);
  353. X  #else
  354. X      savelev(fd,dlevel);
  355. X  #endif
  356. X*** src/Old/cmd.c    Mon Jul 31 13:46:45 1989
  357. X--- src/cmd.c    Thu Jul 27 11:22:54 1989
  358. X***************
  359. X*** 50,56 ****
  360. X  extern int dowhatdoes(); /**/
  361. X  extern int dohelp(); /**/
  362. X  extern int dohistory(); /**/
  363. X- extern int dosh(); /**/
  364. X  extern int doloot(); /**/
  365. X  extern int dodrink(); /**/
  366. X  extern int dodip(); /**/
  367. X--- 50,55 ----
  368. X*** src/Old/dbridge.c    Mon Jul 31 13:47:32 1989
  369. X--- src/dbridge.c    Mon Jul 24 18:19:07 1989
  370. X***************
  371. X*** 256,262 ****
  372. X          /* So, you didn't die */
  373. X          pline("A %s force teleports you away...",
  374. X                Hallucination ? "normal" : "strange");
  375. X!         enexto(&xy, x2, y2);
  376. X          teleds(xy.x, xy.y);
  377. X      }
  378. X      redosym(x,y);
  379. X--- 256,262 ----
  380. X          /* So, you didn't die */
  381. X          pline("A %s force teleports you away...",
  382. X                Hallucination ? "normal" : "strange");
  383. X!         enexto(&xy, x2, y2, &playermon);
  384. X          teleds(xy.x, xy.y);
  385. X      }
  386. X      redosym(x,y);
  387. X***************
  388. X*** 358,364 ****
  389. X          /* So, you didn't die */
  390. X          pline("A %s force teleports you away...",
  391. X                Hallucination ? "normal" : "strange");
  392. X!         enexto(&xy, x2, y2);
  393. X          teleds(xy.x, xy.y);
  394. X      }
  395. X      redosym(x,y);
  396. X--- 358,364 ----
  397. X          /* So, you didn't die */
  398. X          pline("A %s force teleports you away...",
  399. X                Hallucination ? "normal" : "strange");
  400. X!         enexto(&xy, x2, y2, &playermon);
  401. X          teleds(xy.x, xy.y);
  402. X      }
  403. X      redosym(x,y);
  404. X*** src/Old/decl.c    Mon Jul 31 13:48:08 1989
  405. X--- src/decl.c    Sun Jul 30 11:30:32 1989
  406. X***************
  407. X*** 46,54 ****
  408. X--- 46,58 ----
  409. X  const char nul[40] = DUMMY;        /* contains zeros */
  410. X  char plname[PL_NSIZ] = DUMMY;        /* player name */
  411. X  char pl_character[PL_CSIZ] = DUMMY;
  412. X+ 
  413. X+ #ifdef TUTTI_FRUTTI
  414. X  char pl_fruit[PL_FSIZ] = DUMMY;
  415. X  int current_fruit = 0;
  416. X  struct fruit *ffruit = 0;
  417. X+ #endif
  418. X+ 
  419. X  #ifdef STRONGHOLD
  420. X  char tune[6] = DUMMY;
  421. X  #  ifdef MUSIC
  422. X***************
  423. X*** 55,60 ****
  424. X--- 59,65 ----
  425. X  schar music_heard = 0;
  426. X  #  endif
  427. X  #endif
  428. X+ 
  429. X  char *occtxt = DUMMY;
  430. X  const char quitchars[] = " \r\n\033";
  431. X  const char vowels[] = "aeiouAEIOU";
  432. X***************
  433. X*** 75,80 ****
  434. X--- 80,86 ----
  435. X  const char *configfile = "NetHack.cnf";    /* read by read_config_file() */
  436. X  char levels[PATHLEN];        /* where levels are */
  437. X  #endif /* MSDOS */
  438. X+ 
  439. X  #ifdef DGK
  440. X  char lock[FILENAME];        /* pathname of level files */
  441. X  char permbones[PATHLEN];    /* where permanent copy of bones go */
  442. X***************
  443. X*** 109,114 ****
  444. X--- 115,122 ----
  445. X  boolean in_mklev = FALSE;
  446. X  boolean    stoned = FALSE;            /* done to monsters hit by 'c' */
  447. X  boolean    unweapon = FALSE;
  448. X+ boolean mrg_to_wielded = FALSE; /* weapon picked is merged with wielded one */
  449. X+ 
  450. X  #ifdef KOPS
  451. X  boolean allow_kops = TRUE;
  452. X  #endif
  453. X*** src/Old/do.c    Mon Jul 31 13:49:10 1989
  454. X--- src/do.c    Fri Jul 28 17:53:13 1989
  455. X***************
  456. X*** 6,12 ****
  457. X  
  458. X  #include "hack.h"
  459. X  
  460. X! #if defined(DGK) && !defined(TOS)
  461. X  extern struct finfo fileinfo[];
  462. X  #else
  463. X  extern boolean level_exists[];
  464. X--- 6,12 ----
  465. X  
  466. X  #include "hack.h"
  467. X  
  468. X! #if defined(DGK) && !defined(OLD_TOS)
  469. X  extern struct finfo fileinfo[];
  470. X  #else
  471. X  extern boolean level_exists[];
  472. X***************
  473. X*** 106,112 ****
  474. X--- 106,116 ----
  475. X          pline("The sink quivers upward for a moment.");
  476. X          break;
  477. X          case RIN_POISON_RESISTANCE:
  478. X+ #ifdef TUTTI_FRUTTI
  479. X          You("smell rotten %s.", makeplural(pl_fruit));
  480. X+ #else
  481. X+         You("smell rotten fruit.");
  482. X+ #endif
  483. X          break;
  484. X          case RIN_AGGRAVATE_MONSTER:
  485. X          pline("Several flies buzz angrily around the sink.");
  486. X***************
  487. X*** 591,597 ****
  488. X  # ifdef ENDGAME
  489. X         dlevel == ENDLEVEL ||
  490. X  # endif
  491. X! #if defined(DGK) && !defined(TOS)
  492. X      /* If the level has no .where yet, it hasn't been made */
  493. X         !fileinfo[dlevel].where)
  494. X  #else
  495. X--- 595,601 ----
  496. X  # ifdef ENDGAME
  497. X         dlevel == ENDLEVEL ||
  498. X  # endif
  499. X! #if defined(DGK) && !defined(OLD_TOS)
  500. X      /* If the level has no .where yet, it hasn't been made */
  501. X         !fileinfo[dlevel].where)
  502. X  #else
  503. X***************
  504. X*** 599,605 ****
  505. X  #endif
  506. X          mklev();
  507. X      else {
  508. X! #if defined(DGK) && !defined(TOS)
  509. X          /* If not currently accessible, swap it in. */
  510. X          if (fileinfo[dlevel].where != ACTIVE)
  511. X              swapin_file(dlevel);
  512. X--- 603,609 ----
  513. X  #endif
  514. X          mklev();
  515. X      else {
  516. X! #if defined(DGK) && !defined(OLD_TOS)
  517. X          /* If not currently accessible, swap it in. */
  518. X          if (fileinfo[dlevel].where != ACTIVE)
  519. X              swapin_file(dlevel);
  520. X*** src/Old/do_wear.c    Mon Jul 31 13:50:44 1989
  521. X--- src/do_wear.c    Sun Jul 30 21:04:15 1989
  522. X***************
  523. X*** 861,866 ****
  524. X--- 861,867 ----
  525. X          else setworn((struct obj *)0, otmp->owornmask & W_ARMOR);
  526. X          off_msg(otmp);
  527. X      }
  528. X+     takeoff_mask = taking_off = 0L;
  529. X      return(1);
  530. X  }
  531. X  
  532. X***************
  533. X*** 986,991 ****
  534. X--- 987,993 ----
  535. X  /*        if(is_shield(otmp)) (void) Shield_on(); */
  536. X          on_msg(otmp);
  537. X      }
  538. X+     takeoff_mask = taking_off = 0L;
  539. X      return(1);
  540. X  }
  541. X  
  542. X***************
  543. X*** 1132,1141 ****
  544. X  }
  545. X  
  546. X  void
  547. X! glibr(){
  548. X! register struct obj *otmp;
  549. X! int xfl = 0;
  550. X!     if(!uarmg) if(uleft || uright)
  551. X  #ifdef POLYSELF
  552. X                  if(!nolimbs(uasmon))
  553. X  #endif
  554. X--- 1134,1154 ----
  555. X  }
  556. X  
  557. X  void
  558. X! glibr()
  559. X! {
  560. X!     register struct obj *otmp;
  561. X!     int xfl = 0;
  562. X! #ifdef HARD
  563. X!     boolean leftfall, rightfall;
  564. X! 
  565. X!     leftfall = (uleft && !uleft->cursed && (!uwep || !uwep->cursed));
  566. X!     rightfall = (uright && !uright->cursed && (!uwep || !uwep->cursed
  567. X!         || !bimanual(uwep)));
  568. X! #else
  569. X! #define leftfall uleft
  570. X! #define rightfall uright
  571. X! #endif
  572. X!     if(!uarmg) if(leftfall || rightfall)
  573. X  #ifdef POLYSELF
  574. X                  if(!nolimbs(uasmon))
  575. X  #endif
  576. X***************
  577. X*** 1143,1160 ****
  578. X          /* Note: at present also cursed rings fall off */
  579. X          /* changed 10/30/86 by GAN */
  580. X          Your("%s off your %s.",
  581. X! #ifdef HARD
  582. X!             ((uleft && !uleft->cursed) && (uright && !uright->cursed)) ? "rings slip" : "ring slips",
  583. X! #else
  584. X!             (uleft && uright) ? "rings slip" : "ring slips",
  585. X! #endif
  586. X              makeplural(body_part(FINGER)));
  587. X          xfl++;
  588. X!         if((otmp = uleft) != (struct obj *)0){
  589. X              Ring_off(uleft);
  590. X              dropx(otmp);
  591. X          }
  592. X!         if((otmp = uright) != (struct obj *)0){
  593. X              Ring_off(uright);
  594. X              dropx(otmp);
  595. X          }
  596. X--- 1156,1171 ----
  597. X          /* Note: at present also cursed rings fall off */
  598. X          /* changed 10/30/86 by GAN */
  599. X          Your("%s off your %s.",
  600. X!             (leftfall && rightfall) ? "rings slip" : "ring slips",
  601. X              makeplural(body_part(FINGER)));
  602. X          xfl++;
  603. X!         if(leftfall) {
  604. X!             otmp = uleft;
  605. X              Ring_off(uleft);
  606. X              dropx(otmp);
  607. X          }
  608. X!         if(rightfall) {
  609. X!             otmp = uright;
  610. X              Ring_off(uright);
  611. X              dropx(otmp);
  612. X          }
  613. X*** src/Old/dog.c    Mon Jul 31 13:51:44 1989
  614. X--- src/dog.c    Tue Jul 25 14:37:41 1989
  615. X***************
  616. X*** 229,239 ****
  617. X          switch (obj->otyp) {
  618. X          case TRIPE_RATION:
  619. X              return (carn ? DOGFOOD : MANFOOD);
  620. X-         case CORPSE:
  621. X          case EGG:
  622. X!             if ((obj->age + 50 <= moves && mon->data->mlet != S_FUNGUS) ||
  623. X!             (poisonous(&mons[obj->corpsenm]) && !resists_poison(mon->data)) ||
  624. X!             (obj->corpsenm == PM_COCKATRICE && !resists_ston(mon->data)))
  625. X              return POISON;
  626. X              else return (carn ? CADAVER : MANFOOD);
  627. X          case DEAD_LIZARD:
  628. X--- 229,243 ----
  629. X          switch (obj->otyp) {
  630. X          case TRIPE_RATION:
  631. X              return (carn ? DOGFOOD : MANFOOD);
  632. X          case EGG:
  633. X!             if (obj->corpsenm == PM_COCKATRICE &&
  634. X!                         !resists_ston(mon->data))
  635. X!             return POISON;
  636. X!             return (carn ? CADAVER : MANFOOD);
  637. X!         case CORPSE:
  638. X!             if ((obj->age+50 <= moves && mon->data->mlet != S_FUNGUS) ||
  639. X!             (poisonous(&mons[obj->corpsenm]) &&
  640. X!                         !resists_poison(mon->data)))
  641. X              return POISON;
  642. X              else return (carn ? CADAVER : MANFOOD);
  643. X          case DEAD_LIZARD:
  644. X*** src/Old/dogmove.c    Mon Jul 31 13:52:17 1989
  645. X--- src/dogmove.c    Tue Jul 25 21:33:11 1989
  646. X***************
  647. X*** 335,352 ****
  648. X  
  649. X          nx = sgn(omx - u.ux);
  650. X          ny = sgn(omy - u.uy);
  651. X!         if(goodpos((cc.x = u.ux+nx), (cc.y = u.uy+ny))) goto dognext;
  652. X  
  653. X           i  = xytod(nx, ny);
  654. X          for(j = (i + 7)%8; j < (i + 1)%8; j++) {
  655. X! 
  656. X!            dtoxy(&cc, j);
  657. X!            if(goodpos(cc.x, cc.y)) goto dognext;
  658. X          }
  659. X          for(j = (i + 6)%8; j < (i + 2)%8; j++) {
  660. X! 
  661. X!            dtoxy(&cc, j);
  662. X!            if(goodpos(cc.x, cc.y)) goto dognext;
  663. X          }
  664. X          cc.x = mtmp->mx;
  665. X          cc.y = mtmp->my;
  666. X--- 335,351 ----
  667. X  
  668. X          nx = sgn(omx - u.ux);
  669. X          ny = sgn(omy - u.uy);
  670. X!         if(goodpos((cc.x = u.ux+nx), (cc.y = u.uy+ny), mtmp->data))
  671. X!             goto dognext;
  672. X  
  673. X           i  = xytod(nx, ny);
  674. X          for(j = (i + 7)%8; j < (i + 1)%8; j++) {
  675. X!             dtoxy(&cc, j);
  676. X!             if(goodpos(cc.x, cc.y, mtmp->data)) goto dognext;
  677. X          }
  678. X          for(j = (i + 6)%8; j < (i + 2)%8; j++) {
  679. X!             dtoxy(&cc, j);
  680. X!             if(goodpos(cc.x, cc.y, mtmp->data)) goto dognext;
  681. X          }
  682. X          cc.x = mtmp->mx;
  683. X          cc.y = mtmp->my;
  684. X*** src/Old/dokick.c    Mon Jul 31 13:53:05 1989
  685. X--- src/dokick.c    Mon Jul 31 09:37:37 1989
  686. X***************
  687. X*** 46,53 ****
  688. X  # endif
  689. X      }
  690. X      
  691. X!     mon->mhp -= (!martial() ? rnd(dmg) : rnd(dmg)+rnd(ACURR(A_DEX)/2));  
  692. X      if(mon->mhp < 1) {
  693. X          killed(mon);
  694. X          return;
  695. X      }
  696. X--- 46,56 ----
  697. X  # endif
  698. X      }
  699. X      
  700. X!     if (dmg)
  701. X!         mon->mhp -= (!martial() ? rnd(dmg) :
  702. X!             rnd(dmg)+rnd(ACURR(A_DEX)/2));  
  703. X      if(mon->mhp < 1) {
  704. X+         (void) passive(mon, TRUE, 0);
  705. X          killed(mon);
  706. X          return;
  707. X      }
  708. X***************
  709. X*** 55,62 ****
  710. X              /* see if the monster has a place to move into */
  711. X              mdx = mon->mx + u.dx;
  712. X              mdy = mon->my + u.dy;
  713. X!             if(goodpos(mdx, mdy)) {
  714. X!             pline("%s reels from the blow.", Monnam(mon));
  715. X              levl[mon->mx][mon->my].mmask = 0;
  716. X              levl[mdx][mdy].mmask = 1;
  717. X              mon->mx = mdx;
  718. X--- 58,65 ----
  719. X              /* see if the monster has a place to move into */
  720. X              mdx = mon->mx + u.dx;
  721. X              mdy = mon->my + u.dy;
  722. X!             if(goodpos(mdx, mdy, mon->data)) {
  723. X!             kludge("%s reels from the blow.", Monnam(mon));
  724. X              levl[mon->mx][mon->my].mmask = 0;
  725. X              levl[mdx][mdy].mmask = 1;
  726. X              mon->mx = mdx;
  727. X***************
  728. X*** 65,70 ****
  729. X--- 68,74 ----
  730. X              set_apparxy(mon);
  731. X              }
  732. X      }
  733. X+     (void) passive(mon, FALSE, 1);
  734. X  
  735. X  /*    it is unchivalrous to attack the defenseless or from behind */
  736. X      if (pl_character[0] == 'K' && u.ualigntyp == U_LAWFUL && 
  737. X***************
  738. X*** 92,100 ****
  739. X  
  740. X      setmangry(mon);
  741. X  
  742. X!     if(Levitation && !rn2(3) && verysmall(mon->data) && 
  743. X!             !is_floater(mon->data) && !is_flyer(mon->data)) {
  744. X!         You("are floating in the air, and miss wildly!");
  745. X          return;
  746. X      }
  747. X  
  748. X--- 96,105 ----
  749. X  
  750. X      setmangry(mon);
  751. X  
  752. X!     if(Levitation && !rn2(3) && verysmall(mon->data) &&
  753. X!        !is_flyer(mon->data)) {
  754. X!         pline("Floating in the air, you miss wildly!");
  755. X!         (void) passive(mon, FALSE, 1);
  756. X          return;
  757. X      }
  758. X  
  759. X***************
  760. X*** 105,110 ****
  761. X--- 110,116 ----
  762. X          if(!rn2((i < j/10) ? 2 : (i < j/5) ? 3 : 4)) {
  763. X              if(martial() && !rn2(2)) goto doit;
  764. X              Your("clumsy kick does no damage.");
  765. X+             (void) passive(mon, FALSE, 1);
  766. X              return;
  767. X          }
  768. X          if(i < j/10) clumsy = TRUE;
  769. X***************
  770. X*** 118,132 ****
  771. X  doit:
  772. X      kludge("You kick %s.", mon_nam(mon));
  773. X      if(!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data)) && 
  774. X!        mon->mcansee && !thick_skinned(mon->data) &&
  775. X!        !mon->mfroz && !mon->mstun && !mon->mconf) {
  776. X!         mnexto(mon);
  777. X!         if(mon->mx != x || mon->my != y) {
  778. X!             kludge("%s jumps, %s evading your %skick.", Monnam(mon),
  779. X!                 clumsy ? "easily" : "nimbly",
  780. X                  clumsy ? "clumsy " : "");
  781. X              return;
  782. X!         } /* else fall to the next case */        
  783. X      }
  784. X      kickdmg(mon, clumsy);
  785. X  }
  786. X--- 124,153 ----
  787. X  doit:
  788. X      kludge("You kick %s.", mon_nam(mon));
  789. X      if(!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data)) && 
  790. X!        mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data) && 
  791. X!        mon->data->mlet != S_EEL && haseyes(mon->data) && !mon->mfroz && 
  792. X!        !mon->mstun && !mon->mconf && mon->data->mmove >= 12) {
  793. X!         if(!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
  794. X!             kludge("%s blocks your %skick.", Monnam(mon), 
  795. X                  clumsy ? "clumsy " : "");
  796. X+             (void) passive(mon, FALSE, 1);
  797. X              return;
  798. X!         } else {
  799. X!             mnexto(mon);
  800. X!             if(mon->mx != x || mon->my != y) {
  801. X!                 pline("%s %s, %s evading your %skick.", 
  802. X!                 Blind ? "It" : Monnam(mon),
  803. X!                 (can_teleport(mon->data) ? "teleports" :
  804. X!                  is_flyer(mon->data) ? "flutters" :
  805. X!                  is_floater(mon->data) ? "floats" :
  806. X!                  nolimbs(mon->data) ? "slides" :
  807. X!                  "jumps"),
  808. X!                 clumsy ? "easily" : "nimbly",
  809. X!                 clumsy ? "clumsy " : "");
  810. X!             (void) passive(mon, FALSE, 1);
  811. X!                 return;
  812. X!             } 
  813. X!         }
  814. X      }
  815. X      kickdmg(mon, clumsy);
  816. X  }
  817. X***************
  818. X*** 150,156 ****
  819. X          if(!rn2(4)) setmangry(mtmp); /* not always pleasing */
  820. X          
  821. X          /* greedy monsters catch gold */
  822. X!         pline("%s catches the gold.", Monnam(mtmp));
  823. X          mtmp->mgold += amount;
  824. X          if (mtmp->isshk) {
  825. X              long robbed = ESHK(mtmp)->robbed;
  826. X--- 171,177 ----
  827. X          if(!rn2(4)) setmangry(mtmp); /* not always pleasing */
  828. X          
  829. X          /* greedy monsters catch gold */
  830. X!         kludge("%s catches the gold.", Monnam(mtmp));
  831. X          mtmp->mgold += amount;
  832. X          if (mtmp->isshk) {
  833. X              long robbed = ESHK(mtmp)->robbed;
  834. X***************
  835. X*** 245,255 ****
  836. X      /* if a pile, the "top" object gets kicked */
  837. X      for (otmp = fobj; otmp; otmp = otmp->nobj)
  838. X          if(otmp->ox == x && otmp->oy == y)
  839. X!             if(!otmp->cobj)
  840. X!             if (otmp != uchain) {
  841. X                  cnt++;
  842. X                  if(cnt == 1) obj = otmp;
  843. X!             }
  844. X  
  845. X      /* range < 2 means the object will not move.    */
  846. X      /* maybe dexterity should also figure here.     */
  847. X--- 266,275 ----
  848. X      /* if a pile, the "top" object gets kicked */
  849. X      for (otmp = fobj; otmp; otmp = otmp->nobj)
  850. X          if(otmp->ox == x && otmp->oy == y)
  851. X!             if(!otmp->cobj) {
  852. X                  cnt++;
  853. X                  if(cnt == 1) obj = otmp;
  854. X!             }
  855. X  
  856. X      /* range < 2 means the object will not move.    */
  857. X      /* maybe dexterity should also figure here.     */
  858. X***************
  859. X*** 291,297 ****
  860. X          return(1);
  861. X      }
  862. X  
  863. X!     if(obj->otyp == BOULDER || obj == uball)
  864. X          return(0);
  865. X  
  866. X      /* a box gets a chance of breaking open here */
  867. X--- 311,317 ----
  868. X          return(1);
  869. X      }
  870. X  
  871. X!     if(obj->otyp == BOULDER || obj == uball || obj == uchain)
  872. X          return(0);
  873. X  
  874. X      /* a box gets a chance of breaking open here */
  875. X***************
  876. X*** 375,380 ****
  877. X--- 395,401 ----
  878. X      obj->oy = bhitpos.y;
  879. X      levl[obj->ox][obj->oy].omask = 1;
  880. X      stackobj(obj);
  881. X+     if(!levl[obj->ox][obj->oy].mmask) newsym(obj->ox, obj->oy);
  882. X      return(1);
  883. X  }
  884. X  #endif /* KICK */
  885. X***************
  886. X*** 583,589 ****
  887. X  #ifdef KICK
  888. X  dumb:
  889. X  #endif
  890. X!         if (martial() || ACURR(A_DEX) >= 16) {
  891. X              You("kick at empty space.");
  892. X          } else {
  893. X              pline("Dumb move!  You strain a muscle.");
  894. X--- 604,610 ----
  895. X  #ifdef KICK
  896. X  dumb:
  897. X  #endif
  898. X!         if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
  899. X              You("kick at empty space.");
  900. X          } else {
  901. X              pline("Dumb move!  You strain a muscle.");
  902. X*** src/Old/eat.c    Mon Jul 31 13:54:35 1989
  903. X--- src/eat.c    Wed Jul 26 19:33:43 1989
  904. X***************
  905. X*** 557,568 ****
  906. X              /* Fall through otherwise */
  907. X  #endif
  908. X          default:
  909. X!             if (otmp->otyp==SLIME_MOLD && !otmp->cursed &&
  910. X!                 otmp->spe == current_fruit)
  911. X                  pline(!Hallucination ?
  912. X                      "Mmm!  Your favorite!" :
  913. X                      "Yum!  Your fave fruit!");
  914. X!             else {
  915. X                  int oldquan = otmp->quan;
  916. X                  otmp->quan = 1;
  917. X                  pline("That %s was %s!", xname(otmp),
  918. X--- 557,572 ----
  919. X              /* Fall through otherwise */
  920. X  #endif
  921. X          default:
  922. X! #ifdef TUTTI_FRUTTI
  923. X!             if (otmp->otyp==SLIME_MOLD && !otmp->cursed
  924. X!                 && otmp->spe == current_fruit
  925. X!                                 )
  926. X                  pline(!Hallucination ?
  927. X                      "Mmm!  Your favorite!" :
  928. X                      "Yum!  Your fave fruit!");
  929. X!             else
  930. X! #endif
  931. X!             {
  932. X                  int oldquan = otmp->quan;
  933. X                  otmp->quan = 1;
  934. X                  pline("That %s was %s!", xname(otmp),
  935. X*** src/Old/end.c    Mon Jul 31 13:55:29 1989
  936. X--- src/end.c    Sun Jul 30 12:12:38 1989
  937. X***************
  938. X*** 2,14 ****
  939. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  940. X  /* NetHack may be freely redistributed.  See license for details. */
  941. X  
  942. X- #ifndef TOS
  943. X- #include <signal.h>
  944. X- #endif
  945. X- 
  946. X  /* block some unused #defines to avoid overloading some cpp's */
  947. X  #define MONATTK_H
  948. X  #include "hack.h"
  949. X  
  950. X  #include "eshk.h"
  951. X  
  952. X--- 2,13 ----
  953. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  954. X  /* NetHack may be freely redistributed.  See license for details. */
  955. X  
  956. X  /* block some unused #defines to avoid overloading some cpp's */
  957. X  #define MONATTK_H
  958. X  #include "hack.h"
  959. X+ #ifndef NO_SIGNAL
  960. X+ #include <signal.h>
  961. X+ #endif
  962. X  
  963. X  #include "eshk.h"
  964. X  
  965. X***************
  966. X*** 17,27 ****
  967. X  int
  968. X  done1()
  969. X  {
  970. X! #ifndef TOS
  971. X      (void) signal(SIGINT,SIG_IGN);
  972. X  #endif
  973. X      if(flags.ignintr) {
  974. X! #ifndef TOS
  975. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  976. X  #endif
  977. X          clrlin();
  978. X--- 16,26 ----
  979. X  int
  980. X  done1()
  981. X  {
  982. X! #ifndef NO_SIGNAL
  983. X      (void) signal(SIGINT,SIG_IGN);
  984. X  #endif
  985. X      if(flags.ignintr) {
  986. X! #ifndef NO_SIGNAL
  987. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  988. X  #endif
  989. X          clrlin();
  990. X***************
  991. X*** 38,44 ****
  992. X  {
  993. X      pline("Really quit? ");
  994. X      if(yn() == 'n') {
  995. X! #ifndef TOS
  996. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  997. X  #endif
  998. X          clrlin();
  999. X--- 37,43 ----
  1000. X  {
  1001. X      pline("Really quit? ");
  1002. X      if(yn() == 'n') {
  1003. X! #ifndef NO_SIGNAL
  1004. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1005. X  #endif
  1006. X          clrlin();
  1007. X***************
  1008. X*** 70,76 ****
  1009. X  int
  1010. X  done_intr(){
  1011. X      done_stopprint++;
  1012. X! #ifndef TOS
  1013. X      (void) signal(SIGINT, SIG_IGN);
  1014. X  #ifdef UNIX
  1015. X      (void) signal(SIGQUIT, SIG_IGN);
  1016. X--- 69,75 ----
  1017. X  int
  1018. X  done_intr(){
  1019. X      done_stopprint++;
  1020. X! #ifndef NO_SIGNAL
  1021. X      (void) signal(SIGINT, SIG_IGN);
  1022. X  #ifdef UNIX
  1023. X      (void) signal(SIGQUIT, SIG_IGN);
  1024. X***************
  1025. X*** 182,190 ****
  1026. X  register char *st1;
  1027. X  {
  1028. X      struct permonst *upmon;
  1029. X!     char buf[BUFSZ], buf1[BUFSZ], buf2[BUFSZ];
  1030. X      char    c;
  1031. X      boolean taken;
  1032. X  #ifdef WIZARD
  1033. X      if (wizard && *st1=='t') {
  1034. X          You("are a very tricky wizard, it seems.");
  1035. X--- 181,199 ----
  1036. X  register char *st1;
  1037. X  {
  1038. X      struct permonst *upmon;
  1039. X!     char buf[BUFSZ], buf1[BUFSZ], buf2[BUFSZ], buf3[BUFSZ];
  1040. X!     /* buf: used if killer gets changed
  1041. X!      * buf1: used if st1 gets changed
  1042. X!      * buf2: same as player name, except it is capitalized
  1043. X!      * buf3: used to copy killer in case it comes from something like
  1044. X!         xname(), which would otherwise get overwritten when we call
  1045. X!         xname() when listing possessions
  1046. X!      */
  1047. X      char    c;
  1048. X      boolean taken;
  1049. X+ 
  1050. X+     Strcpy(buf3, killer);
  1051. X+     killer = buf3;
  1052. X  #ifdef WIZARD
  1053. X      if (wizard && *st1=='t') {
  1054. X          You("are a very tricky wizard, it seems.");
  1055. X***************
  1056. X*** 236,248 ****
  1057. X      }
  1058. X  #endif /* WIZARD || EXPLORE_MODE */
  1059. X  die:
  1060. X! #ifndef TOS
  1061. X      (void) signal(SIGINT, (SIG_RET_TYPE) done_intr);
  1062. X  #ifdef UNIX
  1063. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  1064. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  1065. X  #endif
  1066. X! #endif /* TOS /* */
  1067. X      upmon = player_mon();
  1068. X      if(u.ugrave_arise > -1) /* create no corpse */ ;
  1069. X      else if(*st1 == 's' && st1[2] == 'o') 
  1070. X--- 245,257 ----
  1071. X      }
  1072. X  #endif /* WIZARD || EXPLORE_MODE */
  1073. X  die:
  1074. X! #ifndef NO_SIGNAL
  1075. X      (void) signal(SIGINT, (SIG_RET_TYPE) done_intr);
  1076. X  #ifdef UNIX
  1077. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  1078. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  1079. X  #endif
  1080. X! #endif /* NO_SIGNAL /* */
  1081. X      upmon = player_mon();
  1082. X      if(u.ugrave_arise > -1) /* create no corpse */ ;
  1083. X      else if(*st1 == 's' && st1[2] == 'o') 
  1084. X***************
  1085. X*** 435,446 ****
  1086. X  
  1087. X  void
  1088. X  clearlocks(){
  1089. X! #if defined(DGK) && !defined(TOS)
  1090. X      eraseall(levels, alllevels);
  1091. X      if (ramdisk)
  1092. X          eraseall(permbones, alllevels);
  1093. X  #else
  1094. X! #if defined(UNIX) || (defined(MSDOS) && !defined(TOS))
  1095. X      register int x;
  1096. X  #ifdef UNIX
  1097. X      (void) signal(SIGHUP,SIG_IGN);
  1098. X--- 444,455 ----
  1099. X  
  1100. X  void
  1101. X  clearlocks(){
  1102. X! #if defined(DGK) && !defined(OLD_TOS)
  1103. X      eraseall(levels, alllevels);
  1104. X      if (ramdisk)
  1105. X          eraseall(permbones, alllevels);
  1106. X  #else
  1107. X! #if defined(UNIX) || (defined(MSDOS) && !defined(OLD_TOS))
  1108. X      register int x;
  1109. X  #ifdef UNIX
  1110. X      (void) signal(SIGHUP,SIG_IGN);
  1111. X*** src/Old/engrave.c    Mon Jul 31 13:56:16 1989
  1112. X--- src/engrave.c    Sun Jul 30 18:57:51 1989
  1113. X***************
  1114. X*** 208,214 ****
  1115. X      /* There's no reason you should be able to write with a wand
  1116. X       * while both your hands are tied up.
  1117. X       */
  1118. X!     if (!freehand() && otmp != uwep) {
  1119. X          You("have no free %s to write with!", body_part(HAND));
  1120. X          return(0);
  1121. X      }
  1122. X--- 208,214 ----
  1123. X      /* There's no reason you should be able to write with a wand
  1124. X       * while both your hands are tied up.
  1125. X       */
  1126. X!     if (!freehand() && otmp != uwep && !otmp->owornmask) {
  1127. X          You("have no free %s to write with!", body_part(HAND));
  1128. X          return(0);
  1129. X      }
  1130. X***************
  1131. X*** 218,223 ****
  1132. X--- 218,227 ----
  1133. X          return(0);
  1134. X      }
  1135. X  #endif
  1136. X+     if(otmp == ublindf) {
  1137. X+         pline("That is a bit difficult to engrave with, don't you think?");
  1138. X+         return(1);
  1139. X+     }
  1140. X      if(otmp != &zeroobj && index(too_large,otmp->olet)) {
  1141. X          You("can't engrave with such a large object!");
  1142. X          return(1);
  1143. X***************
  1144. X*** 238,246 ****
  1145. X              makeplural(body_part(FINGER)));
  1146. X          type = DUST;
  1147. X      } else if(otmp->olet == WAND_SYM && zappable(otmp)) {
  1148. X!         /* changed so any wand gets zapped out, but fire
  1149. X!          * wands become known.
  1150. X!          */
  1151. X          if((objects[otmp->otyp].bits & NODIR))  {
  1152. X              zapnodir(otmp);
  1153. X              type = DUST;
  1154. X--- 242,248 ----
  1155. X              makeplural(body_part(FINGER)));
  1156. X          type = DUST;
  1157. X      } else if(otmp->olet == WAND_SYM && zappable(otmp)) {
  1158. X!         /* changed so any wand gets zapped out */
  1159. X          if((objects[otmp->otyp].bits & NODIR))  {
  1160. X              zapnodir(otmp);
  1161. X              type = DUST;
  1162. X***************
  1163. X*** 307,313 ****
  1164. X                      do  {
  1165. X                          tx = rn1(COLNO-3,2);
  1166. X                          ty = rn2(ROWNO);
  1167. X!                     }  while(!goodpos(tx,ty));
  1168. X                      oep->engr_x = tx;
  1169. X                      oep->engr_y = ty;
  1170. X                      pline("The engraving on the floor vanishes!");
  1171. X--- 309,315 ----
  1172. X                      do  {
  1173. X                          tx = rn1(COLNO-3,2);
  1174. X                          ty = rn2(ROWNO);
  1175. X!                     }  while(!goodpos(tx,ty,(struct permonst *)0));
  1176. X                      oep->engr_x = tx;
  1177. X                      oep->engr_y = ty;
  1178. X                      pline("The engraving on the floor vanishes!");
  1179. X***************
  1180. X*** 323,334 ****
  1181. X                 doname(otmp));
  1182. X  
  1183. X      } else {
  1184. X!         if(otmp->otyp == DAGGER ||
  1185. X  #ifdef WORM
  1186. X             otmp->otyp == CRYSKNIFE ||
  1187. X  #endif
  1188. X!            is_sword(otmp) || otmp->otyp == AXE) {
  1189. X              type = ENGRAVE;
  1190. X              if((int)otmp->spe <= -3) {
  1191. X                  Your("%s too dull for engraving.",
  1192. X                      aobjnam(otmp, "are"));
  1193. X--- 325,337 ----
  1194. X                 doname(otmp));
  1195. X  
  1196. X      } else {
  1197. X!         if((otmp->otyp >= DAGGER && otmp->otyp <= AXE) ||
  1198. X  #ifdef WORM
  1199. X             otmp->otyp == CRYSKNIFE ||
  1200. X  #endif
  1201. X!            is_sword(otmp)) {
  1202. X              type = ENGRAVE;
  1203. X+ 
  1204. X              if((int)otmp->spe <= -3) {
  1205. X                  Your("%s too dull for engraving.",
  1206. X                      aobjnam(otmp, "are"));
  1207. X***************
  1208. X*** 529,535 ****
  1209. X          bwrite(fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth));
  1210. X          bwrite(fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth);
  1211. X          }
  1212. X! #if defined(DGK) && !defined(TOS)
  1213. X          if (!count_only)
  1214. X  #endif
  1215. X          free((genericptr_t) ep);
  1216. X--- 532,538 ----
  1217. X          bwrite(fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth));
  1218. X          bwrite(fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth);
  1219. X          }
  1220. X! #if defined(DGK) && !defined(OLD_TOS)
  1221. X          if (!count_only)
  1222. X  #endif
  1223. X          free((genericptr_t) ep);
  1224. X***************
  1225. X*** 536,542 ****
  1226. X          ep = ep2;
  1227. X      }
  1228. X      bwrite(fd, (genericptr_t)nul, sizeof(unsigned));
  1229. X! #if defined(DGK) && !defined(TOS)
  1230. X      if (!count_only)
  1231. X  #endif
  1232. X          head_engr = 0;
  1233. X--- 539,545 ----
  1234. X          ep = ep2;
  1235. X      }
  1236. X      bwrite(fd, (genericptr_t)nul, sizeof(unsigned));
  1237. X! #if defined(DGK) && !defined(OLD_TOS)
  1238. X      if (!count_only)
  1239. X  #endif
  1240. X          head_engr = 0;
  1241. X*** src/Old/fountain.c    Mon Jul 31 13:57:44 1989
  1242. X--- src/fountain.c    Sat Jul 29 12:04:24 1989
  1243. X***************
  1244. X*** 125,131 ****
  1245. X      }
  1246. X      else if (fate < 10) {
  1247. X          pline("The cool draught refreshes you.");
  1248. X!         lesshungry(rnd(10));
  1249. X      } else {
  1250. X          switch (fate) {
  1251. X  
  1252. X--- 125,131 ----
  1253. X      }
  1254. X      else if (fate < 10) {
  1255. X          pline("The cool draught refreshes you.");
  1256. X!         u.uhunger += rnd(10); /* don't choke on water */
  1257. X      } else {
  1258. X          switch (fate) {
  1259. X  
  1260. X***************
  1261. X*** 148,154 ****
  1262. X--- 148,158 ----
  1263. X  
  1264. X              pline("The water is contaminated!");
  1265. X              if (Poison_resistance) {
  1266. X+ #ifdef TUTTI_FRUTTI
  1267. X         pline("Perhaps it is runoff from the nearby %s farm.", pl_fruit);
  1268. X+ #else
  1269. X+        pline("Perhaps it is runoff from the nearby orange farm.");
  1270. X+ #endif
  1271. X                 losehp(rnd(4),"unrefrigerated sip of juice");
  1272. X                 break;
  1273. X              }
  1274. X*** src/Old/hack.c    Mon Jul 31 13:59:24 1989
  1275. X--- src/hack.c    Sat Jul 29 12:04:28 1989
  1276. X***************
  1277. X*** 688,694 ****
  1278. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1279. X          if(x == u.ux && y == u.uy) continue;
  1280. X          if(levl[x][y].mmask && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1281. X!             (!mtmp->minvis || See_invisible)) {
  1282. X              if((flags.run != 1 && !mtmp->mtame) || (x == u.ux+u.dx && y == u.uy+u.dy))
  1283. X                  goto stop;
  1284. X          } else mtmp = 0;
  1285. X--- 688,694 ----
  1286. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1287. X          if(x == u.ux && y == u.uy) continue;
  1288. X          if(levl[x][y].mmask && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1289. X!             (!mtmp->minvis || See_invisible) && !mtmp->mundetected) {
  1290. X              if((flags.run != 1 && !mtmp->mtame) || (x == u.ux+u.dx && y == u.uy+u.dy))
  1291. X                  goto stop;
  1292. X          } else mtmp = 0;
  1293. X***************
  1294. X*** 803,809 ****
  1295. X  cansee(x,y)
  1296. X  xchar x,y;
  1297. X  {
  1298. X!     if(Blind || u.uswallow) return(0);
  1299. X      if(dist(x,y) < 3) return(1);
  1300. X      if(IS_ROCK(levl[x][y].typ) && levl[u.ux][u.uy].typ == CORR &&
  1301. X                              !levl[u.ux][u.uy].lit)
  1302. X--- 803,809 ----
  1303. X  cansee(x,y)
  1304. X  xchar x,y;
  1305. X  {
  1306. X!     if(Blind || (u.uswallow && (x != u.ux || y != u.uy))) return(0);
  1307. X      if(dist(x,y) < 3) return(1);
  1308. X      if(IS_ROCK(levl[x][y].typ) && levl[u.ux][u.uy].typ == CORR &&
  1309. X                              !levl[u.ux][u.uy].lit)
  1310. X***************
  1311. X*** 950,955 ****
  1312. X--- 950,956 ----
  1313. X                      (!!(HSleep_resistance & INTRINSIC)) +
  1314. X                      (!!(HDisint_resistance & INTRINSIC)) +
  1315. X                      (!!(HTeleport_control & INTRINSIC)) +
  1316. X+                     (!!(Stealth & INTRINSIC)) +
  1317. X                      (!!(Fast & INTRINSIC)) +
  1318. X                      (!!(HInvis & INTRINSIC)))
  1319. X                  pline("%s, all your powers will be lost...",
  1320. X*** src/Old/invent.c    Mon Jul 31 14:00:38 1989
  1321. X--- src/invent.c    Sat Jul 29 21:59:04 1989
  1322. X***************
  1323. X*** 145,150 ****
  1324. X--- 145,151 ----
  1325. X      } else {
  1326. X          setnotworn(obj);
  1327. X          freeinv(obj);
  1328. X+         delete_contents(obj);
  1329. X          obfree(obj, (struct obj *) 0);
  1330. X      }
  1331. X  }
  1332. X***************
  1333. X*** 187,194 ****
  1334. X      freeobj(obj);
  1335. X      unpobj(obj);
  1336. X  
  1337. X! /*    if contained in something else, decrease the container weight */
  1338. X!     if(obj->cobj) dec_cwt(obj->cobj, obj);
  1339. X  
  1340. X      obfree(obj, (struct obj *) 0);
  1341. X  }
  1342. X--- 188,195 ----
  1343. X      freeobj(obj);
  1344. X      unpobj(obj);
  1345. X  
  1346. X! /*    if a container, get rid of the contents */
  1347. X!     delete_contents(obj);
  1348. X  
  1349. X      obfree(obj, (struct obj *) 0);
  1350. X  }
  1351. X*** src/Old/lock.c    Mon Jul 31 14:05:39 1989
  1352. X--- src/lock.c    Mon Jul 24 15:20:37 1989
  1353. X***************
  1354. X*** 166,172 ****
  1355. X  
  1356. X  #ifdef POLYSELF
  1357. X      if(nohands(uasmon)) {
  1358. X!         You("can't hold a %s - you have no hands!");
  1359. X          return(0);
  1360. X      }
  1361. X  #endif
  1362. X--- 166,172 ----
  1363. X  
  1364. X  #ifdef POLYSELF
  1365. X      if(nohands(uasmon)) {
  1366. X!         You("can't hold a %s - you have no hands!", xname(pick));
  1367. X          return(0);
  1368. X      }
  1369. X  #endif
  1370. X*** src/Old/mail.c    Mon Jul 31 14:06:16 1989
  1371. X--- src/mail.c    Thu Jul 27 11:37:31 1989
  1372. X***************
  1373. X*** 47,53 ****
  1374. X   *    - It may also do this with adjoining castle rooms.
  1375. X   */
  1376. X  
  1377. X! # ifdef AMIGA
  1378. X  int mustgetmail = -1;
  1379. X  # endif
  1380. X  
  1381. X--- 47,53 ----
  1382. X   *    - It may also do this with adjoining castle rooms.
  1383. X   */
  1384. X  
  1385. X! # ifndef UNIX
  1386. X  int mustgetmail = -1;
  1387. X  # endif
  1388. X  
  1389. X***************
  1390. X*** 180,186 ****
  1391. X      nscr();
  1392. X  }
  1393. X  
  1394. X! # ifdef AMIGA
  1395. X  void
  1396. X  ckmailstatus() {
  1397. X      if (mustgetmail < 0)
  1398. X--- 180,186 ----
  1399. X      nscr();
  1400. X  }
  1401. X  
  1402. X! # ifndef UNIX
  1403. X  void
  1404. X  ckmailstatus() {
  1405. X      if (mustgetmail < 0)
  1406. X***************
  1407. X*** 194,204 ****
  1408. X  void
  1409. X  readmail()
  1410. X  {
  1411. X!     pline("It says: \"How nice to get a letter down here!\"");
  1412. X  }
  1413. X- # endif /* AMIGA */
  1414. X  
  1415. X! # ifdef UNIX
  1416. X  void
  1417. X  ckmailstatus() {
  1418. X      if(!mailbox
  1419. X--- 194,204 ----
  1420. X  void
  1421. X  readmail()
  1422. X  {
  1423. X!     pline("It says:  \"Please disregard previous letter.\"");
  1424. X  }
  1425. X  
  1426. X! # else /* UNIX */
  1427. X! 
  1428. X  void
  1429. X  ckmailstatus() {
  1430. X      if(!mailbox
  1431. X*** src/Old/makedefs.c    Mon Jul 31 14:06:47 1989
  1432. X--- src/makedefs.c    Fri Jul 28 17:53:20 1989
  1433. X***************
  1434. X*** 18,24 ****
  1435. X--- 18,26 ----
  1436. X  #endif
  1437. X  
  1438. X  #ifdef MSDOS
  1439. X+ #ifndef TOS
  1440. X  # define freopen _freopen
  1441. X+ #endif
  1442. X  # undef    exit
  1443. X  extern void exit P((int));
  1444. X  # define RDMODE    "r"
  1445. X***************
  1446. X*** 416,422 ****
  1447. X  #endif
  1448. X  
  1449. X  #ifdef MSDOS
  1450. X! # ifndef AMIGA
  1451. X  /* Get around bug in freopen when opening for writing    */
  1452. X  /* Supplied by Nathan Glasser (nathan@mit-eddie)    */
  1453. X  #undef freopen
  1454. X--- 418,424 ----
  1455. X  #endif
  1456. X  
  1457. X  #ifdef MSDOS
  1458. X! # if !defined(AMIGA) && !defined(TOS)
  1459. X  /* Get around bug in freopen when opening for writing    */
  1460. X  /* Supplied by Nathan Glasser (nathan@mit-eddie)    */
  1461. X  #undef freopen
  1462. X***************
  1463. X*** 439,445 ****
  1464. X      else
  1465. X      return freopen(fname,fmode,fp);
  1466. X  }
  1467. X! # endif /* AMIGA */
  1468. X  
  1469. X  # if defined(__TURBOC__) || defined(AMIGA)
  1470. X  int
  1471. X--- 441,447 ----
  1472. X      else
  1473. X      return freopen(fname,fmode,fp);
  1474. X  }
  1475. X! # endif /* !AMIGA && !TOS */
  1476. X  
  1477. X  # if defined(__TURBOC__) || defined(AMIGA)
  1478. X  int
  1479. X*** src/Old/makemon.c    Mon Jul 31 14:07:38 1989
  1480. X--- src/makemon.c    Tue Jul 25 14:39:14 1989
  1481. X***************
  1482. X*** 32,38 ****
  1483. X           * are peaceful and some are not, the result will just be a
  1484. X           * smaller group.
  1485. X           */
  1486. X!         enexto(&mm, mm.x, mm.y);
  1487. X          mon = makemon(mtmp->data, mm.x, mm.y);
  1488. X          mon->mpeaceful = 0;
  1489. X          set_malign(mon);
  1490. X--- 32,38 ----
  1491. X           * are peaceful and some are not, the result will just be a
  1492. X           * smaller group.
  1493. X           */
  1494. X!         enexto(&mm, mm.x, mm.y, mtmp->data);
  1495. X          mon = makemon(mtmp->data, mm.x, mm.y);
  1496. X          mon->mpeaceful = 0;
  1497. X          set_malign(mon);
  1498. X***************
  1499. X*** 421,427 ****
  1500. X          do {
  1501. X              x = rn1(COLNO-3,2);
  1502. X              y = rn2(ROWNO);
  1503. X!         } while(!goodpos(x, y));
  1504. X      }
  1505. X  
  1506. X      /* if a monster already exists at the position, return */
  1507. X--- 421,427 ----
  1508. X          do {
  1509. X              x = rn1(COLNO-3,2);
  1510. X              y = rn2(ROWNO);
  1511. X!         } while(!goodpos(x, y, ptr));
  1512. X      }
  1513. X  
  1514. X      /* if a monster already exists at the position, return */
  1515. X***************
  1516. X*** 575,583 ****
  1517. X  }
  1518. X  
  1519. X  void
  1520. X! enexto(cc, xx,yy)
  1521. X  coord *cc;
  1522. X  register xchar xx, yy;
  1523. X  {
  1524. X      register xchar x,y;
  1525. X      coord foo[15], *tfoo;
  1526. X--- 575,584 ----
  1527. X  }
  1528. X  
  1529. X  void
  1530. X! enexto(cc, xx, yy, mdat)
  1531. X  coord *cc;
  1532. X  register xchar xx, yy;
  1533. X+ struct permonst *mdat;
  1534. X  {
  1535. X      register xchar x,y;
  1536. X      coord foo[15], *tfoo;
  1537. X***************
  1538. X*** 587,611 ****
  1539. X      range = 1;
  1540. X      do {    /* full kludge action. */
  1541. X          for(x = xx-range; x <= xx+range; x++)
  1542. X!             if(goodpos(x, yy-range)) {
  1543. X                  tfoo->x = x;
  1544. X                  (tfoo++)->y = yy-range;
  1545. X                  if(tfoo == &foo[15]) goto foofull;
  1546. X              }
  1547. X          for(x = xx-range; x <= xx+range; x++)
  1548. X!             if(goodpos(x,yy+range)) {
  1549. X                  tfoo->x = x;
  1550. X                  (tfoo++)->y = yy+range;
  1551. X                  if(tfoo == &foo[15]) goto foofull;
  1552. X              }
  1553. X          for(y = yy+1-range; y < yy+range; y++)
  1554. X!             if(goodpos(xx-range,y)) {
  1555. X                  tfoo->x = xx-range;
  1556. X                  (tfoo++)->y = y;
  1557. X                  if(tfoo == &foo[15]) goto foofull;
  1558. X              }
  1559. X          for(y = yy+1-range; y < yy+range; y++)
  1560. X!             if(goodpos(xx+range,y)) {
  1561. X                  tfoo->x = xx+range;
  1562. X                  (tfoo++)->y = y;
  1563. X                  if(tfoo == &foo[15]) goto foofull;
  1564. X--- 588,612 ----
  1565. X      range = 1;
  1566. X      do {    /* full kludge action. */
  1567. X          for(x = xx-range; x <= xx+range; x++)
  1568. X!             if(goodpos(x, yy-range, mdat)) {
  1569. X                  tfoo->x = x;
  1570. X                  (tfoo++)->y = yy-range;
  1571. X                  if(tfoo == &foo[15]) goto foofull;
  1572. X              }
  1573. X          for(x = xx-range; x <= xx+range; x++)
  1574. X!             if(goodpos(x, yy+range, mdat)) {
  1575. X                  tfoo->x = x;
  1576. X                  (tfoo++)->y = yy+range;
  1577. X                  if(tfoo == &foo[15]) goto foofull;
  1578. X              }
  1579. X          for(y = yy+1-range; y < yy+range; y++)
  1580. X!             if(goodpos(xx-range, y, mdat)) {
  1581. X                  tfoo->x = xx-range;
  1582. X                  (tfoo++)->y = y;
  1583. X                  if(tfoo == &foo[15]) goto foofull;
  1584. X              }
  1585. X          for(y = yy+1-range; y < yy+range; y++)
  1586. X!             if(goodpos(xx+range, y, mdat)) {
  1587. X                  tfoo->x = xx+range;
  1588. X                  (tfoo++)->y = y;
  1589. X                  if(tfoo == &foo[15]) goto foofull;
  1590. X***************
  1591. X*** 620,645 ****
  1592. X  }
  1593. X  
  1594. X  int
  1595. X! goodpos(x, y)
  1596. X  {
  1597. X! #ifdef STUPID
  1598. X!     if (x < 1 || x > COLNO-2 || y < 1 || y > ROWNO-2 ||
  1599. X!         levl[x][y].mmask || !ACCESSIBLE(levl[x][y].typ))
  1600. X!       return 0;
  1601. X      if (IS_DOOR(levl[x][y].typ) &&
  1602. X!         (levl[x][y].doormask & (D_LOCKED | D_CLOSED)))
  1603. X!       return 0;
  1604. X!     return !((x == u.ux && y == u.uy) || sobj_at(BOULDER, x, y));
  1605. X! #else
  1606. X!     return
  1607. X!     ! (x < 1 || x > COLNO-2 || y < 1 || y > ROWNO-2 ||
  1608. X!        levl[x][y].mmask || !ACCESSIBLE(levl[x][y].typ) ||
  1609. X!        (IS_DOOR(levl[x][y].typ) && 
  1610. X!         (levl[x][y].doormask & (D_LOCKED | D_CLOSED)) )
  1611. X!        || (x == u.ux && y == u.uy)
  1612. X!        || sobj_at(BOULDER, x, y)
  1613. X!     );
  1614. X! #endif /* STUPID */
  1615. X  }
  1616. X  
  1617. X  void
  1618. X--- 621,647 ----
  1619. X  }
  1620. X  
  1621. X  int
  1622. X! goodpos(x, y, mdat)
  1623. X! int x,y;
  1624. X! struct permonst *mdat;
  1625. X  {
  1626. X!     if (x < 1 || x > COLNO-2 || y < 1 || y > ROWNO-2 || levl[x][y].mmask)
  1627. X!         return 0;
  1628. X!     if (x == u.ux && y == u.uy) return 0;
  1629. X!     if (mdat) {
  1630. X!         if (IS_POOL(levl[x][y].typ))
  1631. X!         if (mdat == &playermon && HLevitation)    return 1;
  1632. X!         else    return (is_flyer(mdat) || is_swimmer(mdat));
  1633. X!         if (passes_walls(mdat)) return 1;
  1634. X!     }
  1635. X!     if (!ACCESSIBLE(levl[x][y].typ)) return 0;
  1636. X      if (IS_DOOR(levl[x][y].typ) &&
  1637. X!             (levl[x][y].doormask & (D_LOCKED | D_CLOSED)) &&
  1638. X!             (!mdat || !amorphous(mdat)))
  1639. X!         return 0;
  1640. X!     if (sobj_at(BOULDER, x, y) && (!mdat || !throws_rocks(mdat)))
  1641. X!         return 0;
  1642. X!     return 1;
  1643. X  }
  1644. X  
  1645. X  void
  1646. X***************
  1647. X*** 653,663 ****
  1648. X  #endif
  1649. X      /* if the wiz teleports away to heal, try the up staircase,
  1650. X         to block the player's escaping before he's healed */
  1651. X!     if(!mtmp->iswiz || !goodpos(tx = xupstair, ty = yupstair))
  1652. X         do {
  1653. X          tx = rn1(COLNO-3,2);
  1654. X          ty = rn2(ROWNO);
  1655. X!        } while(!goodpos(tx,ty));
  1656. X      if(mtmp->mx != 0 && mtmp->my != 0)
  1657. X          levl[mtmp->mx][mtmp->my].mmask = 0;
  1658. X      mtmp->mx = tx;
  1659. X--- 655,665 ----
  1660. X  #endif
  1661. X      /* if the wiz teleports away to heal, try the up staircase,
  1662. X         to block the player's escaping before he's healed */
  1663. X!     if(!mtmp->iswiz || !goodpos(tx = xupstair, ty = yupstair, mtmp->data))
  1664. X         do {
  1665. X          tx = rn1(COLNO-3,2);
  1666. X          ty = rn2(ROWNO);
  1667. X!        } while(!goodpos(tx,ty,mtmp->data));
  1668. X      if(mtmp->mx != 0 && mtmp->my != 0)
  1669. X          levl[mtmp->mx][mtmp->my].mmask = 0;
  1670. X      mtmp->mx = tx;
  1671. X***************
  1672. X*** 1096,1102 ****
  1673. X          int s_sym = get_shop_item(rt - SHOPBASE);
  1674. X  
  1675. X          if (s_sym < 0) sym = objects[-sym].oc_olet;
  1676. X!         else if (sym == RANDOM_SYM)
  1677. X              sym = syms[rn2(sizeof(syms)-2) + 2];
  1678. X          else sym = s_sym;
  1679. X      } else sym = syms[rn2(sizeof syms)];
  1680. X--- 1098,1104 ----
  1681. X          int s_sym = get_shop_item(rt - SHOPBASE);
  1682. X  
  1683. X          if (s_sym < 0) sym = objects[-sym].oc_olet;
  1684. X!         else if (s_sym == RANDOM_SYM)
  1685. X              sym = syms[rn2(sizeof(syms)-2) + 2];
  1686. X          else sym = s_sym;
  1687. X      } else sym = syms[rn2(sizeof syms)];
  1688. X*** src/Old/mhitm.c    Mon Jul 31 14:09:22 1989
  1689. X--- src/mhitm.c    Sun Jul 30 18:57:41 1989
  1690. X***************
  1691. X*** 281,288 ****
  1692. X--- 281,291 ----
  1693. X      if(cansee(magr->mx, magr->my))    pmon(magr);
  1694. X      if((tmp = mdamagem(magr, mdef, mattk)) == 2) {
  1695. X          levl[mx][my].mmask = 0;
  1696. X+         levl[magr->mx][magr->my].mmask = 1;
  1697. X          return(2);    /* defender died */
  1698. X      } else {        /* defender survived */
  1699. X+         if(cansee(mdef->mx, mdef->my))
  1700. X+             pline("%s is regurgitated!", Monnam(mdef));
  1701. X          if(cansee(magr->mx, magr->my))    unpmon(magr);
  1702. X          magr->mx = mx;
  1703. X          magr->my = my;
  1704. X***************
  1705. X*** 289,294 ****
  1706. X--- 292,298 ----
  1707. X          /* move off of defender */
  1708. X          if(cansee(magr->mx, magr->my))    pmon(magr);
  1709. X          if(cansee(mdef->mx, mdef->my))    pmon(mdef);
  1710. X+         nscr();
  1711. X          return(tmp);
  1712. X      }
  1713. X  }
  1714. X***************
  1715. X*** 458,464 ****
  1716. X          tmp = 0;    /* no damage if this fails */
  1717. X          break;
  1718. X          case AD_TLPT:
  1719. X!         if(!magr->mcan && tmp >= mdef->mhp) {
  1720. X              rloc(mdef);
  1721. X              if(vis && !cansee(mdef->mx, mdef->my))
  1722. X              pline("%s suddenly disappears!", Monnam(mdef));
  1723. X--- 462,468 ----
  1724. X          tmp = 0;    /* no damage if this fails */
  1725. X          break;
  1726. X          case AD_TLPT:
  1727. X!         if(!magr->mcan && tmp < mdef->mhp) {
  1728. X              rloc(mdef);
  1729. X              if(vis && !cansee(mdef->mx, mdef->my))
  1730. X              pline("%s suddenly disappears!", Monnam(mdef));
  1731. X*** src/Old/mhitu.c    Mon Jul 31 14:10:51 1989
  1732. X--- src/mhitu.c    Sat Jul 29 12:04:33 1989
  1733. X***************
  1734. X*** 58,64 ****
  1735. X  {
  1736. X      /* Note: if opposite gender, "seductively" */
  1737. X      /* If same gender, "engagingly" for nymph, normal msg for others */
  1738. X!     if(sp_melee(mtmp) && !mtmp->mcan) {
  1739. X          if(!is_nymph(mtmp) && incompatible(mtmp)) goto strike;
  1740. X              kludge("%s %s you %s.", Monnam(mtmp),
  1741. X              Blind ? "talks to" : "smiles at",
  1742. X--- 58,64 ----
  1743. X  {
  1744. X      /* Note: if opposite gender, "seductively" */
  1745. X      /* If same gender, "engagingly" for nymph, normal msg for others */
  1746. X!     if(sp_melee(mtmp) && !mtmp->mcan && !mtmp->mspec_used) {
  1747. X          if(!is_nymph(mtmp) && incompatible(mtmp)) goto strike;
  1748. X              kludge("%s %s you %s.", Monnam(mtmp),
  1749. X              Blind ? "talks to" : "smiles at",
  1750. X***************
  1751. X*** 248,258 ****
  1752. X              mtmp->mx = u.ux; mtmp->my = u.uy;
  1753. X              levl[mtmp->mx][mtmp->my].mmask = 1;
  1754. X              pmon(mtmp);
  1755. X!             enexto(&cc, u.ux, u.uy);
  1756. X!             /* Luckily piercers cannot walk through walls, so this
  1757. X!              * will work.  If they can (i.e., if someone adds a potion
  1758. X!              * of phasing), we gotta change this...
  1759. X!              */
  1760. X              teleds(cc.x, cc.y);
  1761. X              You("fall from the ceiling!");
  1762. X              if (is_mercenary(mtmp->data) && m_carrying(mtmp,HELMET)) {
  1763. X--- 248,254 ----
  1764. X              mtmp->mx = u.ux; mtmp->my = u.uy;
  1765. X              levl[mtmp->mx][mtmp->my].mmask = 1;
  1766. X              pmon(mtmp);
  1767. X!             enexto(&cc, u.ux, u.uy, &playermon);
  1768. X              teleds(cc.x, cc.y);
  1769. X              You("fall from the ceiling!");
  1770. X              if (is_mercenary(mtmp->data) && m_carrying(mtmp,HELMET)) {
  1771. X***************
  1772. X*** 839,845 ****
  1773. X           * is, no matter what covers it.
  1774. X           */
  1775. X          getbronze = (mdat == &mons[PM_BLACK_PUDDING] &&
  1776. X!                  uarm->otyp == BRONZE_PLATE_MAIL);
  1777. X          while (1) {
  1778. X              switch(rn2(5)) {
  1779. X              case 0:
  1780. X--- 835,841 ----
  1781. X           * is, no matter what covers it.
  1782. X           */
  1783. X          getbronze = (mdat == &mons[PM_BLACK_PUDDING] &&
  1784. X!                  uarm && uarm->otyp == BRONZE_PLATE_MAIL);
  1785. X          while (1) {
  1786. X              switch(rn2(5)) {
  1787. X              case 0:
  1788. X***************
  1789. X*** 1240,1245 ****
  1790. X--- 1236,1242 ----
  1791. X      register struct attack  *mattk;
  1792. X  {
  1793. X      switch(mattk->adtyp) {
  1794. X+ #ifdef MEDUSA
  1795. X          case AD_STON:
  1796. X          if (mtmp->mcan) {
  1797. X              You("notice that %s isn't all that ugly.",mon_nam(mtmp));
  1798. X***************
  1799. X*** 1258,1263 ****
  1800. X--- 1255,1261 ----
  1801. X              done("stoned");
  1802. X              }
  1803. X          break;
  1804. X+ #endif
  1805. X          case AD_CONF:
  1806. X          if(!mtmp->mcan && canseemon(mtmp) && mtmp->mcansee && 
  1807. X                      !mtmp->mspec_used && rn2(5)) {
  1808. X*** src/Old/mklev.c    Thu Jul 20 14:11:02 1989
  1809. X--- src/mklev.c    Mon Jul 31 15:23:45 1989
  1810. X***************
  1811. X*** 788,794
  1812. X              mtmp->msleep = 1;
  1813. X          for (tryct = rn1(1,3); tryct; tryct--) {
  1814. X              x = somex(croom); y = somey(croom);
  1815. X!             if (goodpos(x,y))
  1816. X                  (void) mk_tt_statue(x, y);
  1817. X          }
  1818. X      }
  1819. X
  1820. X--- 788,794 -----
  1821. X              mtmp->msleep = 1;
  1822. X          for (tryct = rn1(1,3); tryct; tryct--) {
  1823. X              x = somex(croom); y = somey(croom);
  1824. X!             if (goodpos(x,y,(struct permonst *)0))
  1825. X                  (void) mk_tt_statue(x, y);
  1826. X          }
  1827. X      }
  1828. X***************
  1829. X*** 815,821
  1830. X  #ifdef REINCARNATION
  1831. X      if (dlevel == rogue_level) {
  1832. X         You("feel as though you were here in a previous lifetime.");
  1833. X!        return;
  1834. X      }
  1835. X  #endif
  1836. X      makecorridors();
  1837. X
  1838. X--- 815,821 -----
  1839. X  #ifdef REINCARNATION
  1840. X      if (dlevel == rogue_level) {
  1841. X         You("feel as though you were here in a previous lifetime.");
  1842. X!        goto skip0;
  1843. X      }
  1844. X  #endif
  1845. X      makecorridors();
  1846. X***************
  1847. X*** 871,877
  1848. X  #endif
  1849. X      if(dlevel > 18 && !rn2(6)) mkroom(SWAMP);
  1850. X  
  1851. X! 
  1852. X      /* for each room: put things inside */
  1853. X      for(croom = rooms; croom->hx > 0; croom++) {
  1854. X          register boolean boxinlev = FALSE;
  1855. X
  1856. X--- 871,879 -----
  1857. X  #endif
  1858. X      if(dlevel > 18 && !rn2(6)) mkroom(SWAMP);
  1859. X  
  1860. X! #ifdef REINCARNATION
  1861. X! skip0:
  1862. X! #endif
  1863. X      /* for each room: put things inside */
  1864. X      for(croom = rooms; croom->hx > 0; croom++) {
  1865. X          register boolean boxinlev = FALSE;
  1866. X*** src/Old/mkobj.c    Mon Jul 31 14:13:59 1989
  1867. X--- src/mkobj.c    Sat Jul 29 12:04:35 1989
  1868. X***************
  1869. X*** 138,144 ****
  1870. X  
  1871. X  static void
  1872. X  mkbox_cnts(box)
  1873. X! /* Note: does not check to see if it overloaded the box weight; usually
  1874. X   * possible only with corpses in ice boxes.
  1875. X   */
  1876. X  struct obj *box;
  1877. X--- 138,144 ----
  1878. X  
  1879. X  static void
  1880. X  mkbox_cnts(box)
  1881. X! /* Note: does not check to see if it overloaded the box capacity; usually
  1882. X   * possible only with corpses in ice boxes.
  1883. X   */
  1884. X  struct obj *box;
  1885. X***************
  1886. X*** 160,166 ****
  1887. X      for(n = rn2(n+1); n > 0; n--) {
  1888. X          if (box->otyp == ICE_BOX) {
  1889. X          otmp = mksobj(CORPSE, TRUE);
  1890. X!         otmp->age = moves;
  1891. X          } else {
  1892. X          register int tprob;
  1893. X          struct icp *iprobs = boxiprobs;
  1894. X--- 160,169 ----
  1895. X      for(n = rn2(n+1); n > 0; n--) {
  1896. X          if (box->otyp == ICE_BOX) {
  1897. X          otmp = mksobj(CORPSE, TRUE);
  1898. X!         /* Note: setting age to 0 is correct.  Age has a different
  1899. X!          * from usual meaning for objects stored in ice boxes. -KAA
  1900. X!          */
  1901. X!         otmp->age = 0;
  1902. X          } else {
  1903. X          register int tprob;
  1904. X          struct icp *iprobs = boxiprobs;
  1905. X***************
  1906. X*** 174,180 ****
  1907. X          otmp->cobj = box;
  1908. X          otmp->nobj = fcobj;
  1909. X          fcobj = otmp;
  1910. X!         inc_cwt(box, otmp);
  1911. X          }
  1912. X      }
  1913. X      return;
  1914. X--- 177,183 ----
  1915. X          otmp->cobj = box;
  1916. X          otmp->nobj = fcobj;
  1917. X          fcobj = otmp;
  1918. X!         /* inc_cwt(box, otmp); --done by weight() */
  1919. X          }
  1920. X      }
  1921. X      return;
  1922. X***************
  1923. X*** 264,271 ****
  1924. X              otmp->corpsenm = rndmonnum();
  1925. X              } while (mons[otmp->corpsenm].geno & G_NOCORPSE);
  1926. X              blessorcurse(otmp, 10);
  1927. X!         } else if (otmp->otyp == SLIME_MOLD)
  1928. X              otmp->spe = current_fruit;
  1929. X          /* fall into next case */
  1930. X      case GEM_SYM:
  1931. X          if (otmp->otyp == LOADSTONE) curse(otmp);
  1932. X--- 267,277 ----
  1933. X              otmp->corpsenm = rndmonnum();
  1934. X              } while (mons[otmp->corpsenm].geno & G_NOCORPSE);
  1935. X              blessorcurse(otmp, 10);
  1936. X!         }
  1937. X! #ifdef TUTTI_FRUTTI
  1938. X!         else if (otmp->otyp == SLIME_MOLD)
  1939. X              otmp->spe = current_fruit;
  1940. X+ #endif
  1941. X          /* fall into next case */
  1942. X      case GEM_SYM:
  1943. X          if (otmp->otyp == LOADSTONE) curse(otmp);
  1944. X***************
  1945. X*** 279,284 ****
  1946. X--- 285,291 ----
  1947. X                      blessorcurse(otmp, 5);
  1948. X                      break;
  1949. X          case MAGIC_LAMP:    otmp->spe = 1;
  1950. X+                     otmp->recharged = 0;
  1951. X                      blessorcurse(otmp, 2);
  1952. X                      break;
  1953. X          case KEY:        /* key # index */
  1954. X***************
  1955. X*** 452,457 ****
  1956. X--- 459,465 ----
  1957. X  
  1958. X      if (Is_container(obj)) {
  1959. X          struct obj *contents;
  1960. X+         obj->owt = wt;
  1961. X          for(contents=fcobj; contents; contents=contents->nobj) {
  1962. X              if (contents->cobj == obj)
  1963. X                  inc_cwt(obj, contents);
  1964. X*** src/Old/mkroom.c    Mon Jul 31 14:14:45 1989
  1965. X--- src/mkroom.c    Wed Jul 26 19:32:59 1989
  1966. X***************
  1967. X*** 253,260 ****
  1968. X          levl[tx][ty].typ = THRONE;
  1969. X          levl[tx][ty].scrsym = THRONE_SYM;
  1970. X  
  1971. X!         tx = somex(sroom);
  1972. X!         ty = somey(sroom);
  1973. X          mkgold((long) rn1(50 * dlevel,10), sx, sy);
  1974. X          (void) mksobj_at(CHEST, sx, sy);    /* the royal coffers */
  1975. X      }
  1976. X--- 253,260 ----
  1977. X          levl[tx][ty].typ = THRONE;
  1978. X          levl[tx][ty].scrsym = THRONE_SYM;
  1979. X  
  1980. X!         sx = somex(sroom);
  1981. X!         sy = somey(sroom);
  1982. X          mkgold((long) rn1(50 * dlevel,10), sx, sy);
  1983. X          (void) mksobj_at(CHEST, sx, sy);    /* the royal coffers */
  1984. X      }
  1985. X***************
  1986. X*** 439,448 ****
  1987. X  squadmon() {        /* return soldier types. */
  1988. X  
  1989. X      register struct permonst *ptr;
  1990. X!     register int    i, cpro, sel = rnd(80+dlevel);
  1991. X  
  1992. X      for(cpro = i = 0; i < NSTYPES; i++)
  1993. X!         if((cpro += squadprob[i].prob) > sel) {
  1994. X  
  1995. X          ptr = &mons[squadprob[i].pm];
  1996. X          goto gotone;
  1997. X--- 439,448 ----
  1998. X  squadmon() {        /* return soldier types. */
  1999. X  
  2000. X      register struct permonst *ptr;
  2001. X!     register int    i, cpro, sel_prob = rnd(80+dlevel);
  2002. X  
  2003. X      for(cpro = i = 0; i < NSTYPES; i++)
  2004. X!         if((cpro += squadprob[i].prob) > sel_prob) {
  2005. X  
  2006. X          ptr = &mons[squadprob[i].pm];
  2007. X          goto gotone;
  2008. X*** src/Old/mon.c    Mon Jul 31 14:15:45 1989
  2009. X--- src/mon.c    Mon Jul 31 12:58:38 1989
  2010. X***************
  2011. X*** 292,297 ****
  2012. X--- 292,299 ----
  2013. X              mtmp->mhp += objects[otmp->otyp].oc_weight;
  2014. X              if (mtmp->mhp > mtmp->mhpmax) mtmp->mhp = mtmp->mhpmax;
  2015. X              }
  2016. X+             if((uball && otmp == uball) ||
  2017. X+                (uchain && otmp == uchain)) unpunish();
  2018. X              freeobj(otmp);
  2019. X              /* Left behind a pile? */
  2020. X              if(rnd(25) < 3) (void) mksobj_at(ROCK, mtmp->mx, mtmp->my);
  2021. X***************
  2022. X*** 312,318 ****
  2023. X      for (otmp = fobj; otmp; otmp = otmp2) {
  2024. X          otmp2 = otmp->nobj;
  2025. X          if (otmp->ox == mtmp->mx && otmp->oy == mtmp->my) {
  2026. X!         if(!objects[otmp->otyp].oc_material <= WOOD) {
  2027. X              if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
  2028. X              pline("%s eats %s!", Monnam(mtmp),
  2029. X                  distant_name(otmp, doname));
  2030. X--- 314,320 ----
  2031. X      for (otmp = fobj; otmp; otmp = otmp2) {
  2032. X          otmp2 = otmp->nobj;
  2033. X          if (otmp->ox == mtmp->mx && otmp->oy == mtmp->my) {
  2034. X!         if(objects[otmp->otyp].oc_material <= WOOD) {
  2035. X              if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
  2036. X              pline("%s eats %s!", Monnam(mtmp),
  2037. X                  distant_name(otmp, doname));
  2038. X***************
  2039. X*** 423,428 ****
  2040. X--- 425,433 ----
  2041. X  {
  2042. X      register int newload = weight(otmp);
  2043. X  
  2044. X+     if (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE
  2045. X+                         && !resists_ston(mtmp->data))
  2046. X+         return(FALSE);
  2047. X      if (mtmp->isshk) return(TRUE); /* no limit */
  2048. X      if (mtmp->mpeaceful && !mtmp->mtame) return(FALSE);
  2049. X      /* otherwise players might find themselves obligated to violate
  2050. X***************
  2051. X*** 1061,1067 ****
  2052. X      struct monst *mtmp;
  2053. X  {
  2054. X      coord mm;
  2055. X!     enexto(&mm, u.ux, u.uy);
  2056. X      levl[mtmp->mx][mtmp->my].mmask = 0;
  2057. X      levl[mm.x][mm.y].mmask = 1;
  2058. X      mtmp->mx = mm.x;
  2059. X--- 1066,1072 ----
  2060. X      struct monst *mtmp;
  2061. X  {
  2062. X      coord mm;
  2063. X!     enexto(&mm, u.ux, u.uy, mtmp->data);
  2064. X      levl[mtmp->mx][mtmp->my].mmask = 0;
  2065. X      levl[mm.x][mm.y].mmask = 1;
  2066. X      mtmp->mx = mm.x;
  2067. X***************
  2068. X*** 1077,1084 ****
  2069. X      boolean gz;     
  2070. X  {
  2071. X      coord mm;
  2072. X!     if(!gz || !goodpos(x,y)) {
  2073. X!         enexto(&mm, x, y);
  2074. X          x = mm.x; y = mm.y;
  2075. X      }
  2076. X      if(x == mtmp->mx && y == mtmp->my) /* that was easy */
  2077. X--- 1082,1089 ----
  2078. X      boolean gz;     
  2079. X  {
  2080. X      coord mm;
  2081. X!     if(!gz || !goodpos(x,y,mtmp->data)) {
  2082. X!         enexto(&mm, x, y, mtmp->data);
  2083. X          x = mm.x; y = mm.y;
  2084. X      }
  2085. X      if(x == mtmp->mx && y == mtmp->my) /* that was easy */
  2086. X*** src/Old/monmove.c    Mon Jul 31 14:17:24 1989
  2087. X--- src/monmove.c    Wed Jul 26 12:01:12 1989
  2088. X***************
  2089. X*** 204,210 ****
  2090. X--- 204,217 ----
  2091. X  #endif
  2092. X              unstuck(mtmp);    /* monster lets go when fleeing */
  2093. X          mtmp->mflee = 1;
  2094. X+ #ifdef STUPID
  2095. X+         if (rn2(7))
  2096. X+             mtmp->mfleetim = rnd(10);
  2097. X+         else
  2098. X+             mtmp->mfleetim = rnd(100);
  2099. X+ #else
  2100. X          mtmp->mfleetim = (rn2(7) ? rnd(10) : rnd(100));
  2101. X+ #endif
  2102. X      }
  2103. X  
  2104. X  #ifdef HARD    /* Demonic Blackmail!!! */
  2105. X***************
  2106. X*** 262,268 ****
  2107. X--- 269,282 ----
  2108. X                              (BOLT_LIM * BOLT_LIM));
  2109. X          if(scared && !mtmp->mflee) {
  2110. X              mtmp->mflee = 1;
  2111. X+ #ifdef STUPID
  2112. X+             if (rn2(7))
  2113. X+                 mtmp->mfleetim = rnd(10);
  2114. X+             else
  2115. X+                 mtmp->mfleetim = rnd(100);
  2116. X+ #else
  2117. X              mtmp->mfleetim = (rn2(7) ? rnd(10) : rnd(100));
  2118. X+ #endif
  2119. X          }
  2120. X      }
  2121. X  
  2122. END_OF_FILE
  2123. if test 54643 -ne `wc -c <'src1.diff'`; then
  2124.     echo shar: \"'src1.diff'\" unpacked with wrong size!
  2125. fi
  2126. # end of 'src1.diff'
  2127. fi
  2128. echo shar: End of archive 3 \(of 6\).
  2129. cp /dev/null ark3isdone
  2130. MISSING=""
  2131. for I in 1 2 3 4 5 6 ; do
  2132.     if test ! -f ark${I}isdone ; then
  2133.     MISSING="${MISSING} ${I}"
  2134.     fi
  2135. done
  2136. if test "${MISSING}" = "" ; then
  2137.     echo You have unpacked all 6 archives.
  2138.     echo "now type ./do_patch.sh"
  2139.     rm -f ark[1-9]isdone
  2140. else
  2141.     echo You still need to unpack the following archives:
  2142.     echo "        " ${MISSING}
  2143. fi
  2144. ##  End of shell archive.
  2145. exit 0
  2146.